﻿<cfscript>
/** 
* DataBase Frameworks - Sequence
* 
* @hint "DataBase Frameworks - Sequence - StudentExam" 
*/ 

component 
	displayname="public.service.db.senate.sequence.StudentExam" 
	output=false 
	accessors=true 
	{

	property type="string" name="TaskExamID" hint="考试号";
	property type="string" name="StudentID" hint="学号";
	
	/**
	* @hint "初始化对象"
	*/
	public function init() output=false {
		return this;
	}
	
/**
	* @hint "自定义主键规则"
	* 
	* @ExamTask "考试任务"
	* @Student "学生"
	*/	
	public string function getID() output=false {
		
		var nextID = getTaskExamID() & getStudentID();

		/* 
			主键生成规则 
			
			考试任务号30位 10位考试号 20位学号

			Unique: TASK_EXID, STU_ID
		*/
		return nextID;
	}

}

</cfscript>